#!/usr/bin/env python

import json
from os import path
from devyco.main import main
from subprocess import check_call

if __name__ == '__main__':
    base_dir = path.abspath(path.dirname(__file__))  # Use dir of file
    settings = {}
    settings_file = path.join(base_dir, 'settings.json')
    if path.isfile(settings_file):
        with open(settings_file, 'r') as f:
            settings = json.load(f)

    # we have repos that use LFS which require this step
    check_call(["git", "lfs", "install", "--skip-repo"])
    main(base_dir, settings)
    print "All done!"
